import React from 'react'
import { Button,Card,message} from "antd";
import './ui.less'
// Message 
export default class Message extends React.Component{
    constructor(){
        super()
        this.state={}
    }

    showMessage =(type)=>{
        message[type]("这里是全局消息提示框!!")
    }

    render(){
        return(
            <div>
                <Card title="全局消息提示框" className="cardbox">
                    <Button type="primary" onClick={()=>this.showMessage("success")}>Success</Button>
                    <Button type="primary" onClick={()=>this.showMessage("info")}>Info</Button>
                    <Button type="primary" onClick={()=>this.showMessage("warning")}>Warning</Button>
                    <Button type="primary" onClick={()=>this.showMessage("error")}>Error</Button>
                    <Button type="primary" onClick={()=>this.showMessage("loading")}>Loading</Button>
                </Card>
            </div>
        )
    }
}